<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
            <title>{$goods['goods_title']}_{:C('c_title')}</title>
            <link href="__MZUI__/css/admin.css" rel="stylesheet" type="text/css" />
            <link href="__MZUI__/css/amazeui.css" rel="stylesheet" type="text/css" />
            <link href="__CSS__/home/demo.css" rel="stylesheet" type="text/css" />
            <link type="text/css" href="__CSS__/home/optstyle.css" rel="stylesheet" />
            <link type="text/css" href="__CSS__/home/style.css" rel="stylesheet" />
            <script type="text/javascript" src="__JQ__"></script>
            <script type="text/javascript" src="__JS__/public.lib.js"></script>
            <script type="text/javascript" src="__LY__"></script>
            <script type="text/javascript" src="__JS__/quick_links.js"></script>
            <script type="text/javascript" src="__MZUI__/js/amazeui.js"></script>
            <script type="text/javascript" src="__JS__/jquery.imagezoom.min.js"></script>
            <script type="text/javascript" src="__JS__/jquery.flexslider.js"></script>
            <script type="text/javascript" src="__JS__/list.js"></script>
    </head>
    <body>
        <include file="Include/header" />

        <div class="clear"></div>
        <b class="line"></b>
        <div class="listMain">

            <!--分类-->
            <div class="nav-table">
                <div class="long-title"><span class="all-goods">全部分类</span></div>
                <div class="nav-cont">
                    <ul>
                        <li class="index"><a href="{:HOME_URL}">首页</a></li>
                        <foreach name="middle_navigation" item="v">
                            <li>
                                <if condition="($v['nav_new_open'])">
                                    <a class="qc" href="{$v['nav_url']}" title="{$v['nav_title']}" target="_blank" >{$v['nav_title']}</a>
                                    <else />
                                    <a class="qc" href="{$v['nav_url']}" title="{$v['nav_title']}" >{$v['nav_title']}</a>
                                </if>
                            </li>
                        </foreach>
                    </ul>
                    <!--<div class="nav-extra">
                        <i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
                        <i class="am-icon-angle-right" style="padding-left: 10px;"></i>
                    </div>-->
                </div>
            </div>
            <ol class="am-breadcrumb am-breadcrumb-slash">
                <li><a href="{:HOME_URL}">首页</a></li>
                <li><a href="{:HOME_URL}/Cate/tdd{$goods['goods_class1']}">{$class1_name1}</a></li>
                <li><a href="{:HOME_URL}/Cate/tdd{$goods['goods_class2']}">{$class1_name2}</a></li>
                <li><a href="{:HOME_URL}/Cate/tdd{$goods['goods_class3']}">{$class1_name3}</a></li>
                <li class="am-active">{$goods['goods_title']}</li>
            </ol>
            <script type="text/javascript">
                $(function () {});
                $(window).load(function () {
                    $('.flexslider').flexslider({
                        animation: "slide",
                        start: function (slider) {
                            $('body').removeClass('loading');
                        }
                    });
                });
            </script>
            <div class="scoll">
                <section class="slider">
                    <div class="flexslider">
                        <ul class="slides">
                            <foreach name="goods['images']" item="vo" key="k">
                                <li><img src="{$vo}"></li>
                            </foreach>
                        </ul>
                    </div>
                </section>
            </div>

            <!--放大镜-->
            <form action="{:U('/Trader/nowbuy')}" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY">
                <div class="item-inform">
                    <div class="clearfixLeft" id="clearcontent">

                        <div class="box">
                            <script type="text/javascript">
                                $(document).ready(function () {
                                    $(".jqzoom").imagezoom();
                                    $("#thumblist li a").click(function () {
                                        $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
                                        $(".jqzoom").attr('src', $(this).find("img").attr("mid"));
                                        $(".jqzoom").attr('rel', $(this).find("img").attr("big"));
                                    });
                                });
                            </script>

                            <div class="tb-booth tb-pic tb-s310">
                                <a href="{$goods['images'][0]}"><img src="{$goods['images'][0]}" alt="细节展示放大镜特效" rel="{$goods['images'][0]}" class="jqzoom" /></a>
                            </div>
                            <ul class="tb-thumb" id="thumblist">
                                <foreach name="goods['images']" item="vo" key="k">
                                    <li>
                                        <div class="tb-pic tb-s40">
                                            <a href="#"><img src="{$vo}" mid="{$vo}" big="{$vo}"></a>
                                        </div>
                                    </li>
                                </foreach>
                            </ul>
                        </div>

                        <div class="clear"></div>
                    </div>

                    <div class="clearfixRight">

                        <!--规格属性-->
                        <!--名称-->
                        <div class="tb-detail-hd">
                            <h1>{$goods['goods_title']}</h1>
                        </div>
                        <div class="tb-detail-list">
                            <!--价格-->
                            <div class="tb-detail-price">
                                <li class="price iteminfo_price">
                                    <dt>促销价</dt>
                                    <dd><em>¥</em><b class="sys_item_price">{$goods['goods_price']}</b>  </dd>                                 
                                </li>
                                <li class="price iteminfo_mktprice">
                                    <dt>原价</dt>
                                    <dd><em>¥</em><b class="sys_item_mktprice">{$goods['goods_markprice']}</b></dd>									
                                </li>
                                <div class="clear"></div>
                            </div>

                            <!--地址-->
                            <dl class="iteminfo_parameter freight">
                                <dt>配送至</dt>
                                <div class="iteminfo_freprice">
                                    <div id="store-selector">
                                            <div class="text"><div></div><b></b></div>                   
                                            <div onclick="$('#store-selector').removeClass('hover')" class="close"></div>
                                    </div>
                                    <li id="good_freight">快递费：免运费</li>
                                </div>
                            </dl>
                            <div class="clear"></div>

                            <!--销量-->
                            <ul class="tm-ind-panel">
                                <li class="tm-ind-item tm-ind-sellCount canClick">
                                    <div class="tm-indcon"><span class="tm-label">月销量</span><span class="tm-count">{$goods['goods_hits']}</span></div>
                                </li>
                                <li class="tm-ind-item tm-ind-sumCount canClick">
                                    <div class="tm-indcon"><span class="tm-label">累计销量</span><span class="tm-count">6015</span></div>
                                </li>
                                <li class="tm-ind-item tm-ind-reviewCount canClick tm-line3">
                                    <div class="tm-indcon"><span class="tm-label">累计评价</span><span class="tm-count">640</span></div>
                                </li>
                            </ul>
                            <div class="clear"></div>

                            <!--各种规格-->
                            <dl class="iteminfo_parameter sys_item_specpara">
                                <dt class="theme-login"><div class="cart-title">可选规格<span class="am-icon-angle-right"></span></div></dt>
                                <dd>
                                    <!--操作页面-->

                                    <div class="theme-popover-mask"></div>

                                    <div class="theme-popover">
                                        <div class="theme-popbod dform" id="choose">

                                                <div class="theme-signin-left">

                                                    <foreach item='v' name='attri' key="k">
                                                        <div class="theme-options">
                                                            <div class="cart-title">{$v['guige']}</div>
                                                            <ul class="catt" data-sid="{$k}">
                                                                <input type="hidden" name="guige{$k+1}" id="guige{$k+1}" value="" />
                                                                <foreach item='m' name="v.class">
                                                                    <a class="sku-line"  data-aid="{$m['aid']}">
                                                                        <div class="value-label">{$m['name']}</div>
                                                                    </a>
                                                                </foreach>
                                                            </ul>
                                                        </div>
                                                    </foreach>

                                                    <div class="theme-options">
                                                        <div class="cart-title number">数量</div>
                                                        <dd>
                                    <if condition="$goods['goods_stock'] eq 0">
                                    <span class="tb-stock" id="J_Stock">
                                        <a href="javascript:void(0);" title="减1" class="tb-reduce btn-reduce">-</a>
                                        <input name="number" data-stock="{$goods['goods_stock']}" type="text" class="text" id="number" value="0" onblur="changePrice();">
                                        <a href="javascript:void(0);"  class="tb-increase btn-add" title="加1">+</a>件&nbsp;无货
                                    </span>
                                    <else />
                                    <span class="tb-stock" id="J_Stock">
                                        <a href="javascript:void(0);" title="减1" onclick="goods_cut()" class="tb-reduce btn-reduce">-</a>
                                        <input name="number" data-stock="{$goods['goods_stock']}" type="text" class="text" id="number" value="1" onblur="changePrice();">
                                        <a href="javascript:void(0);"  onclick="goods_add();" class="tb-increase btn-add" title="加1">+</a>件&nbsp;有货
                                    </span>
                                    </if>
                                                        </dd>
                                                    </div>
                                        <script language="javascript" type="text/javascript">
                                            function goods_cut() {
                                                var num_val = document.getElementById('number');
                                                var new_num = num_val.value;
                                                var Num = parseInt(new_num);
                                                if (Num > 1)
                                                    Num = Num - 1;
                                                num_val.value = Num;
                                                changePrice();
                                            }

                                            function goods_add() {
                                                var num_val = document.getElementById('number');
                                                var new_num = num_val.value;
                                                var Num = parseInt(new_num);
                                                Num = Num + 1;
                                                num_val.value = Num;
                                                changePrice();
                                            }

                                            function changePrice() {
                                                if (Number($("#number").attr("data-stock")) < Number($("#number").val())) {
                                                    $("#number").val($("#number").attr("data-stock"));
                                                }
                                                if(Number($("#number").val())<=0){
                                                	$("#number").val(1);
                                                }
                                            };
                                        </script>
                                                    <div class="clear"></div>
                                                    <if condition="($goods['goods_sale'] eq 1) and ($goods['goods_state'] eq 1)">
                                                        <div id="choose-btns" class="buyNub-buy pay" style="display: block;">
                                                            <!-- 立即购买-->
                                                            <li>
                                                                <div class="clearfix tb-btn tb-btn-buy theme-login">
                                                                    <a class="u-buy1" title="立即购买">立即购买</a>
                                                                </div>
                                                            </li>
                                                            <!-- 加入购物车-->
                                                            <li>
                                                                <div class="clearfix tb-btn tb-btn-basket theme-login">
                                                                    <a class="u-buy2" title="添加购物车"><i class="icon-shopping-cart"></i>添加购物车</a>
                                                                </div>
                                                            </li>
                                                            <input type="hidden" name="goods_id" value="{$goods['goods_id']}" />
                                                            <input id="goods_transport" type="hidden" name="transport_id" value="{$goods['transport_id']}" />
                                                        </div>
                                                        <else />
                                                        <div id="choose-btns" class="buyNub-buy" style="display: block;">
                                                            <a class="u-buy3" title="此商品已售罄">此商品已售罄</a>
                                                        </div>
                                                    </if>
                                                </div>

                                                <div id="supp_info">

                                                    <div id="shop-info">
                                                        <dl class="shop-title">
                                                            <dt>
                                                                <a href="{:HOME_URL}/Supplier/{$goods['store_id']}" target="_blank">{$store['store_name']}</a>
                                                            </dt>
                                                        </dl>
                                                        <div class="blank"></div>
                                                        <div class="shop-info-detail">
                                                            <dl style="padding-top:10px;">
                                                                <dt>公司名称：</dt>
                                                                <dd title="{$store['store_company_name']}">{$store['store_company_name']|sub_str=###,0,9}</dd>
                                                            </dl>
                                                            <dl>
                                                                <dt>商店等级：</dt>
                                                                <dd>中级店铺</dd>
                                                            </dl>
                                                            <dl>
                                                                <dt>客服 QQ：</dt>
                                                                <dd>
                                                                    <a href="tencent://message/?uin=2734780971&Site=&menu=yes"><img src="http://wpa.qq.com/pa?p=1:2734780971:4" height="16" border="0" alt="QQ"></a>
                                                                </dd>
                                                            </dl>
                                                            <dl>
                                                                <dt>客服电话：</dt>
                                                                <dd>400-0371-775</dd>
                                                            </dl>
                                                            <dl>
                                                                <dt>所在地区：</dt>
                                                                <dd>{$store['area_info']}</dd>
                                                            </dl>

                                                            <ul class="score-detail">
                                                                <li>
                                                                    <a title="描述5.0"> <span class="score-tit score-tit1">描述</span><span class="scores">{:empty($branch['miaoshu']) ? '5.0' : $branch['miaoshu']}</span> </a>
                                                                </li>
                                                                <li>
                                                                    <a title="服务5.0"> <span class="score-tit score-tit2">服务</span><span class="scores">{:empty($branch['fuwu']) ? '5.0' : $branch['fuwu']}</span> </a>
                                                                </li>
                                                                <li style="margin-right: 0px">
                                                                    <a title="物流5.0"> <span class="score-tit score-tit3">物流</span><span class="scores">{:empty($branch['wuliu']) ? '5.0' : $branch['wuliu']}</span> </a>
                                                                </li>
                                                            </ul>
                                                            <div id="enter-shop">
                                                                <div class="enter-shop-item">
                                                                    <a class="btn-flat1 goto-shop" href="{:HOME_URL}/Supplier/{$goods['store_id']}" target="_blank"><i></i>进入商店 </a>
                                                                    <a class="btn-flat1 shop-add quick-dian" onclick="favorites({$goods['store_id']},40,1)">
                                                                        <i></i>
                                                                        <span class="guanzhu_txt_num{$goods['store_id']}">
                                                                            <if condition="$user_num neq 0">
                                                                                已关注
                                                                                <else />
                                                                                关注本店	
                                                                            </if>
                                                                        </span>
                                                                    </a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                        </div>
                                    </div>

                                </dd>
                            </dl>
                            <div class="clear"></div>
                        </div>

                    </div>
                </div>
                <!--优惠套装-->
                <div class="match">
                    <div class="match-title">店铺推荐</div>
                    <div class="match-comment">
                        <ul class="like_list">
                            <foreach item="v" name="datawww">
                                <li>
                                    <div class="s_picBox">
                                        <a class="s_pic" href="{:HOME_URL}/Goods/{$v['goods_id']}"><img src="{$v['goods_thumb']}"></a>
                                    </div> <a class="txt" target="_blank" href="#">{$v['goods_title']|sub_str=0,12}</a>
                                    <div class="info-box"> <span class="info-box-price">¥ {$v['goods_price']}</span> <span class="info-original-price">￥ {$v['goods_markprice']}</span> </div>
                                </li>
                            </foreach>
                        </ul>
                    </div>
                </div>
                <div class="clear"></div>


                <!-- introduce-->

                <div class="introduce">
                    <div class="browse">
                        <div class="mc"> 
                            <ul>					    
                                <div class="mt">            
                                    <h2>看了又看</h2>        
                                </div>
                                <foreach item="v" name="classGoods">
                                    <li class="first">
                                        <div class="p-img">                    
                                            <a  href="{:HOME_URL}/Goods/{$v['goods_id']}"> <img class="" src="{$v['goods_thumb']}"> </a>               
                                        </div>
                                        <div class="p-name"><a href="{:HOME_URL}/Goods/{$v['goods_id']}">{$v['goods_title']|sub_str=0,24}</a></div>
                                        <div class="p-price"><strong>￥{$v['goods_price']}</strong></div>
                                    </li>
                                </foreach>
                            </ul>					
                        </div>
                    </div>
                    <div class="introduceMain">
                        <div class="am-tabs" data-am-tabs>
                            <ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
                                <li class="am-active">
                                    <a href="#"><span class="index-needs-dt-txt">宝贝详情</span></a>
                                </li>
                                <li>
                                    <a href="#"><span class="index-needs-dt-txt">全部评价</span></a>
                                </li>
                                <li>
                                    <a href="#"><span class="index-needs-dt-txt">猜你喜欢</span></a>
                                </li>
                            </ul>

                            <div class="am-tabs-bd">

                                <div class="am-tab-panel am-fade am-in am-active">
                                    <div class="J_Brand">
                                        <div class="attr-list-hd tm-clear">
                                            <h4>产品参数：</h4></div>
                                        <div class="clear"></div>
                                        <ul id="J_AttrUL">
                                            <foreach item='v' name='spec'>
                                                <li>{$v['paraname']}：{$v['value']}</li>
                                            </foreach>
                                        </ul>
                                        <div class="clear"></div>
                                    </div>

                                    <div class="details">
                                        <div class="attr-list-hd after-market-hd">
                                            <h4>商品细节</h4>
                                        </div>
                                        <div class="twlistNews">
                                            {$goods['goods_content']}
                                        </div>
                                    </div>
                                    <div class="clear"></div>

                                </div>

                                <div class="am-tab-panel am-fade"  id="ECS_MYCOMMENTS">
                                    <div class="clear"></div>
                                    <!-- 提取商品评价 -->
                                    <script type="text/javascript">
                                        $(document).ready(function () {
                                        $.post("{:U('goodsComment')}", {goods_id: {$goods['goods_id']}}, function (result) {
                                        $("#ECS_MYCOMMENTS").html(result['html']);
                                        $("#mct_0 > span").html('(' + result['count'] + ')');
                                        $("#nav > li:nth-child(3) > a").html('商品评价(' + result['count'] + ')');
                                        });
                                        })
                                    </script>
                                    <div class="clear"></div>

                                    <!--分页 -->
                                    <ul class="am-pagination am-pagination-right">
                                        <li class="am-disabled"><a href="#">&laquo;</a></li>
                                        <li class="am-active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li><a href="#">&raquo;</a></li>
                                    </ul>
                                    <div class="clear"></div>

                                    <div class="tb-reviewsft">
                                        <div class="tb-rate-alert type-attention">购买前请查看该商品的 <a href="#" target="_blank">购物保障</a>，明确您的售后保障权益。</div>
                                    </div>

                                </div>

                                <div class="am-tab-panel am-fade">
                                    <div class="like">
                                        <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
                                            <foreach item="v" name="newGoods">
                                                <li>
                                                    <a href="/Goods/{$v['goods_id']}" target="_blank">
                                                        <div class="i-pic limit">
                                                            <img src="{$v['goods_thumb']}" />
                                                            <p>{$v['goods_title']}</p>
                                                            <p class="price fl">
                                                                <b>¥</b>
                                                                <strong>{$v['goods_price']}</strong>
                                                            </p>
                                                        </div>
                                                    </a>
                                                </li>
                                            </foreach>
                                        </ul>
                                    </div>
                                    <div class="clear"></div>
                                    <!--分页 -->
                                    <ul class="am-pagination am-pagination-right">
                                        <li class="am-disabled"><a href="#">&laquo;</a></li>
                                        <li class="am-active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li><a href="#">&raquo;</a></li>
                                    </ul>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
        </div>
        <!--菜单 -->
        <include file="Include/cart" />
        <include file="Include/footer" />
    </body>

</html>
<script type="text/javascript">
var Signin = <?php $user_id =session('user_id'); echo empty($user_id) ? 0 : $user_id; ?>;

function isSstock(){
    var a = $('#number').attr('data-stock');
    if(a == 0){
        return false;
    }else{
        return true;
    }
}

function Specifications() { //选择规格是否满足
    var i = 0;
    var o = $("#choose .catt");
    var d = new Array();
    o.each(function() {
        if ($(this).attr("data-attrval")) {
            i++;
            d["guige" + i] = ($(this).attr("data-attrval"));
        }
    })
    d["num"] = ($("#number").val());
    if (! (o.length == i)) {
        o.eq(0).parents("#choose").addClass("choose_bor_bor");
        return false;
    } else {
        o.eq(0).parents("#choose").removeClass("choose_bor_bor");
        return d;
    }
}

$(".u-buy1").click(function() { //立即购买
    if (!Sign()) {
        return false;
    }
    if (!Specifications()) {
        return false;
    }
    if(!isSstock()){
        layer.msg('库存不足！');
        return;
    }
    
    $("#ECS_FORMBUY").submit();
})
$(".u-buy2").click(function() { //加入购物车
    var a;
    if (!Sign()) {
        return false;
    }
    if(!isSstock()){
        layer.msg('库存不足！');
        return;
    }
    if (!Specifications()) {
        return false;
    } else {
        var json = {};
        var s = Specifications();
        for (variable in s) {
            json[variable] = s[variable];
        }
        json["goods_id"] = {$goods['goods_id']};
        a = Aajax("/Trader/addcar", json);
    }
    if (a.p) { //状态
        $(".cart_num").text(a.n); //数量
        result = Aajax("/Trader/reloadCart");
        $(".cart-panel-content").html(result);
        layer.msg('加入成功！');
    }else{
        layer.msg('加入失败！');
    }
})
    //价格json
    var sys_item = {$jsonAttr};

    //商品规格选择
    $(function () {
        $("#choose .catt").each(function () {
            var i = $(this);
            var p = i.find("a");
            p.click(function () {
                if (!!$(this).hasClass("wuxiao")) {
                    return;
                }
                if (!!$(this).hasClass("cattsel")) {
                    $(this).removeClass("cattsel");
                    i.removeAttr("data-attrval");
                } else {
                    $(this).addClass("cattsel").siblings("a").removeClass("cattsel");
                    i.attr("data-attrval", $(this).attr("data-aid"))
                }
                getattrprice() //输出价格
                stock($(this)) //获取库存
                changePrice() //购买数量
            })
        })

        //获取对应属性的价格
        function getattrprice() {
        	var olength=$(".ys_xuan").length;
            var defaultstats = true;
            var _val = '';
            var _resp = {
                mktprice: ".market-price",
                price: ".p-price",
                stock: "#number"
            } //输出对应的class
            $("#choose .catt").each(function () {
                var i = $(this);
                var v = i.attr("data-attrval");
                if (!v) {
                    defaultstats = false;
                } else {
                    _val += _val != "" ? "_" : "";
                    _val += v;
                }
                i.find("input").val(i.attr("data-attrval"));
            })
            if (!!defaultstats) {
                _mktprice = sys_item['sys_attrprice'][_val]['mktprice'];
                _price = sys_item['sys_attrprice'][_val]['price'];
                _stock = sys_item['sys_attrprice'][_val]['stock'];
                Specifications();
            } else {
                if (_val&&olength==1) {
	                _mktprice = sys_item[_val]['mktprice'];
	                _price = sys_item[_val]['price'];
	                _stock = sys_item[_val]['stock'];
            	}else {
                    _mktprice = sys_item['mktprice'];
                    _price = sys_item['price'];
                    _stock = sys_item['stock'];
                }

            }
            //输出价格
            $(_resp.mktprice).text("￥" + _mktprice); ///其中的math.round为截取小数点位数
            $(_resp.price).text("￥" + _price);
            $(_resp.stock).attr("data-stock", _stock);
        }
        //获取库存
        function stock(obj) {
            var a = Number(obj.parent().attr("data-sid")); //获取级数
            var v = $("#choose .catt").eq(a).attr("data-attrval"); //获取选中的规格id
            for (var i = 0; i < $("#choose .catt").length; i++) {
                var _val = ''; //json对象值获取
                if (i != a) {
                    $("#choose .catt").eq(i).find("a").each(function () {
                        $(this).removeClass("wuxiao");
                    })
                    $("#choose .catt").eq(i).find("a").each(function () {
                        var d = $(this).attr("data-aid");
                        switch (a) {
                            case 0:
                                _val = v + "_" + d;
                                break;
                            case 1:
                                _val = d + "_" + v;
                                break;
                        }
                        if (v) {
                            _stock = sys_item['sys_attrprice'][_val]['stock'];
                        }
                        if (_stock == 0) {
                            $(this).addClass("wuxiao");
                        }
                    })
                }
            }
        }
    })
    if($("#choose .catt").length==1){  //初始化规格库存为零样式
    	var g_obj=$("#choose .catt").find("a");
    	g_obj.each(function(){
    		_this=$(this);
    		_stock = sys_item['sys_attrprice'][_this.data("aid")]['stock'];
    		if (_stock == 0) {
                $(this).addClass("wuxiao");
            }
    	})
    }
</script>
<!--地区选择-->
<script src="__JS__/location.js" type="text/javascript" charset="utf-8"></script>